<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // new Function()
    // foo.__proto__ === Function.prototype
    function foo(name, age) {
      console.log(this, name, age)
    }
    foo.apply('abc', ['why', 18])

    // test.__proto__ === Function.prototype
    function test(){}

    console.log(Function.prototype.call)
    console.log(Function.prototype.apply)
    console.log(Function.prototype.apply ===foo.apply)

    Function.prototype.info = 'hello why'
    console.log(test.info)
    console.log(foo.info)
    Function.prototype.bar = function () {
      console.log('bar function execution')
    }
    test.bar()
    foo.bar()

    

  </script>
</body>

</html>